<!DOCTYPE html>
<html>
<head>
    {include file="public/head"}
</head>
<body>
<div class="g-scrollview">
    <div style="margin-top: -60px;">
        <img src="/static/img/logo.png" alt="" width="100%" height="100%">
    </div>
    <form action="checkLogin" method="post" id="login_form">
        <div class="m-cell">
            <div class="cell-item">
                <div class="cell-left">手机号：</div>
                <div class="cell-right">
                    <input type="number" pattern="[0-9]*" class="cell-input" placeholder="请输入登录手机号" name="phone" autocomplete="off" required/>
                </div>
            </div>
            <div class="cell-item">
                <div class="cell-left">密 码：</div>
                <div class="cell-right">
                    <input type="password" class="cell-input" placeholder="请输入登录密码" autocomplete="off" name="password" required/>
                </div>
            </div>
            <div class="m-button">
                <button class="btn-block btn-primary" id="login" type="button">登录</button>
                <a href="/index/login/forget">
                    <p style="margin: 5px;text-align: right;padding: 5px;color: blue;">忘记密码?</p>
                </a>
            </div>
        </div>
    </form>
</div>

{include file="public/js"}
<script>
    !function ($) {
        $login_form=$('#login_form');
        $(document).on('click','#login',function () {
            dialog.confirm('登录','你即将登录华兴',function () {
                $.post($login_form.attr('action'),$login_form.serialize(),function (res) {
                    dialog.toast(res.msg,'none',1000,function () {
                        location.href=res.url;
                    });
                });
            });
        });
    }(jQuery);
</script>
</body>
</html>